Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: open tenders screen #16

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

feat: open tenders screen #16

wants to merge 13 commits into from

Conversation

irony
Copy link
Contributor

@irony irony commented Jan 27, 2022

Visa specifika upphandlingar i lista:
image

Navigera till en specifik upphandling:
image

Skapa ny specifik upphandling från issues:
image

Definiera nödvändig kompetens inkl nivå på kompetensen:
image

@irony
Copy link
Contributor Author

irony commented Jan 27, 2022

Closes #3

Copy link
Member

@StefanWallin StefanWallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some general comments. I'm not too certain about how the process should look or not yet. We need to involve potential users soon :)

export const getTenders = async () => {
const { data } = await axios.get('https://api.upphandling.app/tenders')
export const getTenders = async (disId) => {
const { data } = await axios.get(`https://api.upphandling.app/dis/${disId}/tenders`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have better error handling here so that we do not crash the app if the API is down. Created issue #17 for it

<View style={styles.tenderHeader}>
<Text category={'h6'}>{description}</Text>
<Text category={'c1'}>
{moment(startDate).calendar()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On moment's website they state the following:

Considering using Moment in your project?
There may be better modern alternatives.
For more details and recommendations,
please see Project Status in the docs.

So it seems to me it's kind of deprecated nowadays and we should consider if we should be using it.

A library that supports this kind of relative dates that isn't moment would be https://sugarjs.com/dates/#/Formatting

@@ -21,7 +21,7 @@
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="MN2-I3-ftu">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sponsored by Iteam" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="MN2-I3-ftu">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roll-safe-clever

@@ -176,8 +188,14 @@ export const DIS = ({ navigation, route }) => {
bottomOffset={350}
>
<View style={styles.bottomDrawerContent}>
<Text category="label" style={styles.footerLabel}>{selected.length} ärenden valda. Gå vidare och skapa upphandling.</Text>
<Button onPress={() => navigation.navigate('CreateTender', { id, issues: selected })}>
<Text category="label" style={styles.footerLabel}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this box is active there is also black overlay in top of the list of issues from github. If you want to select 8 github issues you would have to click 15 times. 8 to check boxes and 7 in between to click away the black overlay. Is this on purpose to try and game people into creating smaller DISes or a UX mishap?

@@ -83,7 +83,7 @@ const styles = StyleService.create({
borderRadius: 16,
},
body: {
overflow: '',
// overflow: '', //ILLEGAL!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do this be able to see the Issues screen on my simulator.
overflow only accepts one of these values 'visible', 'hidden', 'scroll'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants